/*
 * Copyright (C) 2023 Beijing Huaxia Chunsong Technology Co., Ltd. 
 * <https://www.chatopera.com>, Licensed under the Chunsong Public 
 * License, Version 1.0  (the "License"), https://docs.cskefu.com/licenses/v1.html
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * Copyright (C) 2018- Jun. 2023 Chatopera Inc, <https://www.chatopera.com>,  Licensed under the Apache License, Version 2.0, 
 * http://www.apache.org/licenses/LICENSE-2.0
 * Copyright (C) 2017 优客服-多渠道客服系统,  Licensed under the Apache License, Version 2.0, 
 * http://www.apache.org/licenses/LICENSE-2.0
 */
package com.cskefu.cc.persistence.repository;


import com.cskefu.cc.model.AgentServiceSummary;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Set;

public interface ServiceSummaryRepository extends JpaRepository<AgentServiceSummary, String> {

    List<AgentServiceSummary> findByAgentserviceid(String agentserviceid);

    AgentServiceSummary findByStatuseventid(String statuseventid);

    Page<AgentServiceSummary> findAll(Specification<AgentServiceSummary> spec, Pageable pageable);  //分页按条件查询

    Page<AgentServiceSummary> findByChannel(String string, Pageable pageable);

    Page<AgentServiceSummary> findByChannelNot(String string, Pageable pageable);

    Page<AgentServiceSummary> findByChannelNotAndSkillIn(String string, Set<String> agentskill, Pageable pageable);

    Page<AgentServiceSummary> findByChannelNotAndProcessTrueAndSkillIn(String string, Set<String> agentskill, Pageable pageable);
}
